package com.zhibi.util.jcaptcha;

import com.octo.captcha.service.captchastore.FastHashMapCaptchaStore;
import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;
import com.octo.captcha.service.image.ImageCaptchaService;

public class VerifySingleton {
	private VerifySingleton(){}
	
	private static ImageCaptchaService instanceFirst = null;
	private static ImageCaptchaService instanceSecond = null;
	private static ImageCaptchaService instanceThree = null;
	  
    // 传入样式类  
    static {  
    	instanceFirst = new DefaultManageableImageCaptchaService(  
                new FastHashMapCaptchaStore(), new FirstImageEngine(),  
                180, 100000, 75000);  
    	instanceSecond = new DefaultManageableImageCaptchaService(
    			new FastHashMapCaptchaStore(), new SecondImageEngine(),
    			180,100000,75000);
    	instanceThree = new DefaultManageableImageCaptchaService(
    			new FastHashMapCaptchaStore(), new ThreeImageEngine(),
    			180,100000,75000);
    }
    
    public static ImageCaptchaService getFirstStyle(){
    	return instanceFirst;
    }
    
    public static ImageCaptchaService getSecondStyle(){
    	return instanceSecond;
    }
    
    public static ImageCaptchaService getThreeStyle(){
    	return instanceThree;
    }

}
